package 装饰模式;

import 装饰模式.Decorates.Decorate;
import 装饰模式.Decorates.DecoratesFactory;
import 装饰模式.Rooms.RoomFactory;

/**
 * 文 件 名 称：Main.
 * 文 件 说 明：
 * 创   建   人：zpen.
 * 创 建 时 间：2018/5/8 11:22.
 */
public class Main {
    public static void main(String[] args) {
        Room room;
        RoomFactory rFactory = new RoomFactory() ;
        room= rFactory.getRoom("ki");

        Decorate decorate1;
        Decorate decorate2;
        DecoratesFactory dFactory = new DecoratesFactory();
        decorate1 = dFactory.getDecorate("fl");
        decorate2 = dFactory.getDecorate("wa");

        decorate1.setRoom(room);
        decorate2.setRoom(decorate1);
        decorate2.oppend();

    }
}
